/**
 * 
 */
package org.skyeye.modeling.actions;

import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.actions.ActionGroup;

/**
 * @author Vivian
 * @date 2017-6-23
 */
public class ControlActionGroup extends ActionGroup {

	private IToolBarManager toolBar = null;
	
	private ControlLoadAction loadAction = new ControlLoadAction();
	
	private ControlStartAction startAction = new ControlStartAction();
	
	private ControlStopAction stopAction = new ControlStopAction();
	
	private ControlQuitAction quitAction = new ControlQuitAction();
	
	public ControlStopAction getStopAction() {
		return stopAction;
	}

	public void setStopAction(ControlStopAction stopAction) {
		this.stopAction = stopAction;
	}

	public ControlQuitAction getQuitAction() {
		return quitAction;
	}

	public void setQuitAction(ControlQuitAction quitAction) {
		this.quitAction = quitAction;
	}

	public void fillActionBars(IActionBars actionBars) {
		if (actionBars == null)
			return;
		toolBar = actionBars.getToolBarManager();
		toolBar.add(loadAction);
		toolBar.add(startAction);	
		toolBar.add(stopAction);
		toolBar.add(quitAction);

	}
	
	public ControlLoadAction getLoadAction() {
		return loadAction;
	}

	public void setLoadAction(ControlLoadAction loadAction) {
		this.loadAction = loadAction;
	}

	public ControlStartAction getStartAction() {
		return startAction;
	}

	public void setStartAction(ControlStartAction startAction) {
		this.startAction = startAction;
	}

	public IToolBarManager getIToolBarManager() {
		return toolBar;
	}

//	public void fillContextMenu(IMenuManager menu) {
//		if (menu == null)
//			return;
//		menu.add(new LoadAction());
//		menu.add(new StartAction());
//
//	}


}